|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.microedition.lcdui.Canvas org.piratis.j2me.core.game.Canvas
CoreCanvas Description
Field Summary | |
protected Display |
display
Canvas display |
protected Image |
offscreen
Double buffering image |
Constructor Summary | |
Canvas(Display display)
Creates a new instance of a CoreCanvas, with an empty (white pixels) buffer for offscreen processing. |
Method Summary | |
void |
flushGraphics()
Flushes the off-screen buffer to the display. |
Display |
getDisplay()
|
protected Graphics |
getGraphics()
Returns the Graphics object for rendering a Game Canvas: it will be the Graphics object of the off-screen buffer. |
protected void |
keyPressed(int keyCode)
|
protected void |
keyReleased(int keyCode)
|
protected void |
paint(Graphics g)
|
protected void |
paintBackground(Graphics g,
BBox2D area)
Paints the current background (if any). |
void |
run()
To be called by a Display#callSerially(java.lang.Runnable)
when requesting a new repaint. |
protected void |
setEngine(Engine newEngine)
Sets its associated engine. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Display display
protected Image offscreen
Constructor Detail |
public Canvas(Display display)
display
- Canva's displayMethod Detail |
protected Graphics getGraphics()
public Display getDisplay()
public void run()
Display#callSerially(java.lang.Runnable)
when requesting a new repaint. It is the same as calling
flushGraphics()
.
run
in interface java.lang.Runnable
Runnable.run()
,
flushGraphics()
,
Display#callSerially(java.lang.Runnable)
protected void paint(Graphics g)
javax.microedition.lcdui.Displayable#paint(Graphics)
protected void paintBackground(Graphics g, BBox2D area)
g
- graphics contextarea
- dirty regionprotected void setEngine(Engine newEngine)
newEngine
- its engineEngine
public void flushGraphics()
protected void keyPressed(int keyCode)
protected void keyReleased(int keyCode)
|
Copyright(c) 2003-2004 Jordi Martin | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |